﻿//会务审核
var fnConferenceCheck = function () {
    if (hrCaption == "term") {
        window.parent.$("#tabs").tabs('close', '会务实际金额审核');
        var pagetitle = "会务实际金额审核";
        parent.addTabs(pagetitle, '../Crm/Deliver/DeliverCost.aspx?r=' + Math.random() + '&flag=hwsh&title=' + encodeURI(pagetitle) + '&id=' + encodeURI(fkey));
        parent.NeedRefreshPage = this;
    } else { alert("请从左边树选择期数."); return; }
}
//财务审核
var fnFinancialCheck = function () {
    if (hrCaption == "term") {
        window.parent.$("#tabs").tabs('close', '财务实际金额审核');
        var pagetitle = "财务实际金额审核";
        parent.addTabs(pagetitle, '../Crm/Deliver/DeliverCost.aspx?r=' + Math.random() + '&flag=cwsh&title=' + encodeURI(pagetitle) + '&id=' + encodeURI(fkey));
        parent.NeedRefreshPage = this;
    } else { alert("请从左边树选择期数."); return; }
}

//自定义查询
var fnCustomQueryRe = function (condition) {
    try {
        if (fkey != '00000000-0000-0000-0000-000000000000') {
            if (hrCaption == "year") {
                const_CustomCondition = condition + "and " + window.encodeURI("datepart(yy,begindate)=" + fkey);
            } else if (hrCaption == "term") {
                const_CustomCondition = condition + "and " + window.encodeURI(" txtProductLayoutID='" + fkey + "'");
            } else if (hrCaption == "yearAll") {
                const_CustomCondition = condition;
            } else {
                const_CustomCondition = condition + "and " + window.encodeURI(" datepart(yy,begindate)=" + hrCaption + " and datepart(mm,begindate)=" + fkey);
            }
        }
        else
            const_CustomCondition = condition;
    } catch (e) {
        const_CustomCondition = condition;
    }

    RefreshData();
}
//自动义双击方法
function CustomDbClick() {

}
